package com.my.app.tools.pojo.em;

import java.awt.*;

public enum EditToolType {
    //
    AGAIN("截图", Color.BLACK, 1, false),
    RECT_HOLLOW("空方", Color.RED, 2, false),
    RECT_FILL("实方", Color.RED, 2, false),
    OVAL_HOLLOW("空圆", Color.RED, 2, false),
    OVAL_FILL("实圆", Color.RED, 2, false),
    LINE("直线", Color.RED, 2, false),
    ARROW("箭头", Color.RED, 2, false),
    ;

    private EditToolType(String desc, Color color, int weight, boolean dottedLine) {
        this.desc = desc;
        this.color = color;
        this.weight = weight;
        this.dottedLine = dottedLine;
    }

    private String desc;
    private Color color;
    private int weight;
    private boolean dottedLine;

    public String getDesc() {
        return desc;
    }

    public Color getColor() {
        return color;
    }

    public int getWeight() {
        return weight;
    }

    public boolean isDottedLine() {
        return dottedLine;
    }

    public static void setColor(Color color) {
        for (EditToolType type : EditToolType.values()) {
            type.color = color;
        }
    }

    public static void setWeight(int weight) {
        for (EditToolType type : EditToolType.values()) {
            type.weight = weight;
        }
    }

    public static void setDottedLine(boolean dottedLine) {
        for (EditToolType type : EditToolType.values()) {
            type.dottedLine = dottedLine;
        }
    }

}
